<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Pin: Pin Process API</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Pin
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Pin Process API<div class="ingroups"><a class="el" href="group__API__REF.html">Instrumentation API Reference</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga9830f4f81eb0f4cab7b66cf6c51ac89a"><td class="memItemLeft" align="right" valign="top">typedef void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__PROCESS.html#ga9830f4f81eb0f4cab7b66cf6c51ac89a">CHILD_PROCESS</a></td></tr>
<tr class="separator:ga9830f4f81eb0f4cab7b66cf6c51ac89a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabccd10f8f7203db2476f28a5c3a8f75b"><td class="memItemLeft" align="right" valign="top">typedef BOOL(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__PROCESS.html#gabccd10f8f7203db2476f28a5c3a8f75b">FOLLOW_CHILD_PROCESS_CALLBACK</a>) (<a class="el" href="group__PIN__PROCESS.html#ga9830f4f81eb0f4cab7b66cf6c51ac89a">CHILD_PROCESS</a> cProcess, VOID *val)</td></tr>
<tr class="separator:gabccd10f8f7203db2476f28a5c3a8f75b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gad9e9d95dd47de9efbf3bf46bb1f549d6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__THREADS.html#ga2bf6029042d57fb825536c795c94d1ed">OS_PROCESS_ID</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__PROCESS.html#gad9e9d95dd47de9efbf3bf46bb1f549d6">CHILD_PROCESS_GetId</a> (<a class="el" href="group__PIN__PROCESS.html#ga9830f4f81eb0f4cab7b66cf6c51ac89a">CHILD_PROCESS</a> cProcess)</td></tr>
<tr class="separator:gad9e9d95dd47de9efbf3bf46bb1f549d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0d58bd9bcb5f952f248df28876f9c7fb"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__PROCESS.html#ga0d58bd9bcb5f952f248df28876f9c7fb">CHILD_PROCESS_GetCommandLine</a> (<a class="el" href="group__PIN__PROCESS.html#ga9830f4f81eb0f4cab7b66cf6c51ac89a">CHILD_PROCESS</a> cProcess, INT *pArgc, const CHAR *const **pArgv)</td></tr>
<tr class="separator:ga0d58bd9bcb5f952f248df28876f9c7fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga82625ca6006c9e0a7c94e60162870fb6"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__PROCESS.html#ga82625ca6006c9e0a7c94e60162870fb6">CHILD_PROCESS_SetPinCommandLine</a> (<a class="el" href="group__PIN__PROCESS.html#ga9830f4f81eb0f4cab7b66cf6c51ac89a">CHILD_PROCESS</a> cProcess, INT argc, const CHAR *const *argv)</td></tr>
<tr class="separator:ga82625ca6006c9e0a7c94e60162870fb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf5f4578464d7e16a4fdc0f95ba21c776"><td class="memItemLeft" align="right" valign="top">NORETURN VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__PROCESS.html#gaf5f4578464d7e16a4fdc0f95ba21c776">PIN_ExitProcess</a> (INT32 exitCode)</td></tr>
<tr class="separator:gaf5f4578464d7e16a4fdc0f95ba21c776"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae2f936a4d53e616f9cb0ca80b8f5acfa"><td class="memItemLeft" align="right" valign="top">INT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__PROCESS.html#gae2f936a4d53e616f9cb0ca80b8f5acfa">PIN_GetPid</a> ()</td></tr>
<tr class="separator:gae2f936a4d53e616f9cb0ca80b8f5acfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa6127aeb954da01691382a96ae2ab729"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__PROCESS.html#gaa6127aeb954da01691382a96ae2ab729">PIN_IsAmxActive</a> (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> threadId)</td></tr>
<tr class="separator:gaa6127aeb954da01691382a96ae2ab729"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac4bfc7dcba11e5b4c7a9f53e60bb75d1"><td class="memItemLeft" align="right" valign="top">UINT32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__PROCESS.html#gac4bfc7dcba11e5b4c7a9f53e60bb75d1">TileCfg_GetTileRows</a> (UINT8 *tileCfgReg, <a class="el" href="group__REG.html#ga8f899d7ad1af070aae505a85cc998fa5">REG</a> tmm)</td></tr>
<tr class="separator:gac4bfc7dcba11e5b4c7a9f53e60bb75d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga09beb15faeb089c02f8154834f551d1f"><td class="memItemLeft" align="right" valign="top">UINT32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__PROCESS.html#ga09beb15faeb089c02f8154834f551d1f">TileCfg_GetTileBytesPerRow</a> (UINT8 *tileCfgReg, <a class="el" href="group__REG.html#ga8f899d7ad1af070aae505a85cc998fa5">REG</a> tmm)</td></tr>
<tr class="separator:ga09beb15faeb089c02f8154834f551d1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga82cdf4b2f74b73228a2dd64f8f49f8ba"><td class="memItemLeft" align="right" valign="top">UINT8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__PROCESS.html#ga82cdf4b2f74b73228a2dd64f8f49f8ba">TileCfg_GetPaletteID</a> (UINT8 *tileCfgReg)</td></tr>
<tr class="separator:ga82cdf4b2f74b73228a2dd64f8f49f8ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5188cd2a4da0f268a47a8f74e6664a5a"><td class="memItemLeft" align="right" valign="top">NORETURN VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__PROCESS.html#ga5188cd2a4da0f268a47a8f74e6664a5a">PIN_ExitApplication</a> (INT32 status)</td></tr>
<tr class="separator:ga5188cd2a4da0f268a47a8f74e6664a5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>These APIs provide information about the instrumented process. They are available in any thread, including any internal thread spawned by the tool. </p>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="ga9830f4f81eb0f4cab7b66cf6c51ac89a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9830f4f81eb0f4cab7b66cf6c51ac89a">&#9670;&nbsp;</a></span>CHILD_PROCESS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void* <a class="el" href="group__PIN__PROCESS.html#ga9830f4f81eb0f4cab7b66cf6c51ac89a">CHILD_PROCESS</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Pin client functions for the follow child process mechanism</p>
<p>CHILD_PROCESS - Handle for child process APIs </p>

</div>
</div>
<a id="gabccd10f8f7203db2476f28a5c3a8f75b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabccd10f8f7203db2476f28a5c3a8f75b">&#9670;&nbsp;</a></span>FOLLOW_CHILD_PROCESS_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef BOOL(* FOLLOW_CHILD_PROCESS_CALLBACK) (<a class="el" href="group__PIN__PROCESS.html#ga9830f4f81eb0f4cab7b66cf6c51ac89a">CHILD_PROCESS</a> cProcess, VOID *val)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call back function before child(Windows*)/exec-ed(Linux*) process is starting to execute. The function can be registered by <a class="el" href="group__PIN__CONTROL.html#gae710eef7b08de1d153a0b7f3469175a0">PIN_AddFollowChildProcessFunction()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">childProcess</td><td>Child process handle, it's lifetime is in the scope of the callback </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>The tool's call-back value</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE If user is interested to inject Pin (and tool) into child/exec-ed process<br  />
 FALSE If user is not interested to inject Pin (and tool) into child/exec-ed process<br  />
</dd></dl>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga0d58bd9bcb5f952f248df28876f9c7fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0d58bd9bcb5f952f248df28876f9c7fb">&#9670;&nbsp;</a></span>CHILD_PROCESS_GetCommandLine()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID CHILD_PROCESS_GetCommandLine </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__PROCESS.html#ga9830f4f81eb0f4cab7b66cf6c51ac89a">CHILD_PROCESS</a>&#160;</td>
          <td class="paramname"><em>cProcess</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">INT *&#160;</td>
          <td class="paramname"><em>pArgc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const CHAR *const **&#160;</td>
          <td class="paramname"><em>pArgv</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get application's original command line (without Pin's command line)</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">childProcess</td><td>child process handle </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">pArgc</td><td>pointer to application's argc </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">pArgv</td><td>pointer to application's argv this data is allocated by Pin and can't be modified by tool, it's lifetime is in the scope of the callback</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT &amp; Probe<br  />
<b>O/S</b>: Windows<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gad9e9d95dd47de9efbf3bf46bb1f549d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad9e9d95dd47de9efbf3bf46bb1f549d6">&#9670;&nbsp;</a></span>CHILD_PROCESS_GetId()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__THREADS.html#ga2bf6029042d57fb825536c795c94d1ed">OS_PROCESS_ID</a> CHILD_PROCESS_GetId </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__PROCESS.html#ga9830f4f81eb0f4cab7b66cf6c51ac89a">CHILD_PROCESS</a>&#160;</td>
          <td class="paramname"><em>cProcess</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get process id of child process (meaningful only for Windows*)</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">childProcess</td><td>child process handle</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>process id of child process</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT &amp; Probe<br  />
<b>O/S</b>: Windows<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga82625ca6006c9e0a7c94e60162870fb6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga82625ca6006c9e0a7c94e60162870fb6">&#9670;&nbsp;</a></span>CHILD_PROCESS_SetPinCommandLine()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID CHILD_PROCESS_SetPinCommandLine </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PIN__PROCESS.html#ga9830f4f81eb0f4cab7b66cf6c51ac89a">CHILD_PROCESS</a>&#160;</td>
          <td class="paramname"><em>cProcess</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">INT&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const CHAR *const *&#160;</td>
          <td class="paramname"><em>argv</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set Pin's (and tool's) command line for the child process (e.g. "c:\\pin_path\\pin -probe -follow_execv -t c:\\pintool_path\\tool --")</p>
<p>If this API is not called, Pin will be injected into child/exec-ed process with the same command line as of current process.</p>
<p>NOTE:</p><ul>
<li>Providing full path for Pin and tool is the safest way to ensure they will be found (e.g. changing execution directory by application)</li>
<li>Use same Pin version for all process tree</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">childProcess</td><td>handle to child process </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">argc</td><td>Pin's (and tool's) argc </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">argv</td><td>Pin's (and tool's) argv, this data is allocated by tool and can't be modified by Pin, it's lifetime is in the scope of this function</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT &amp; Probe<br  />
<b>O/S</b>: Windows<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga5188cd2a4da0f268a47a8f74e6664a5a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5188cd2a4da0f268a47a8f74e6664a5a">&#9670;&nbsp;</a></span>PIN_ExitApplication()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NORETURN VOID PIN_ExitApplication </td>
          <td>(</td>
          <td class="paramtype">INT32&#160;</td>
          <td class="paramname"><em>status</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Terminate the current process after calling the relevant thread and process exit callbacks. This call behaves "as if" the application process itself had executed a process termination system call. It therefore <em>does</em> perform all the finalization actions Pin normally takes on application process exit, including calling registered thread and process fini-functions, unlike <a class="el" href="group__PIN__PROCESS.html#gaf5f4578464d7e16a4fdc0f95ba21c776">PIN_ExitProcess</a>, which exits immediately.</p>
<p>This API may be called from an instrumentation callback function or an analysis routine. However, it should not be called from any <a class="el" href="group__PIN__CONTROL.html#ga8978f19f9ba6f66dcb9ab0763a32927c">FINI_CALLBACK</a> or <a class="el" href="group__PIN__CONTROL.html#ga99a915108f24a372d07d45560db7fa87">THREAD_FINI_CALLBACK</a> routines. It may be called by an application thread or a tool internal thread (that was created via <a class="el" href="group__THREADS.html#ga23fe7ae94deab5bf574ff601d3d85a6b">PIN_SpawnInternalThread</a>).</p>
<p>Be aware, that when called from an internal thread, the calling thread will not exit until after the tool's fini callbacks return. Therefore, to avoid deadlock, your fini callbacks should not wait for that internal thread to exit.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">status</td><td>The result argument to exit </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>This function does not return.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The vm and pin client locks are obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux,Windows,BSD<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gaf5f4578464d7e16a4fdc0f95ba21c776"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf5f4578464d7e16a4fdc0f95ba21c776">&#9670;&nbsp;</a></span>PIN_ExitProcess()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NORETURN VOID PIN_ExitProcess </td>
          <td>(</td>
          <td class="paramtype">INT32&#160;</td>
          <td class="paramname"><em>exitCode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Terminate the current process immediately, without calling any thread or process fini callbacks that may be registered. (See <a class="el" href="group__PIN__PROCESS.html#ga5188cd2a4da0f268a47a8f74e6664a5a">PIN_ExitApplication</a>, if you want fini callbacks to be called).</p>
<p>This function should be used only for abnormal termination of the instrumented process. Normally, the process is terminated when Pin executes a process termination system call on behalf of the application.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">exitCode</td><td>exit code of the process to be reported to the operating system. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the function never returns.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT &amp; Probe<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gae2f936a4d53e616f9cb0ca80b8f5acfa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae2f936a4d53e616f9cb0ca80b8f5acfa">&#9670;&nbsp;</a></span>PIN_GetPid()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">INT PIN_GetPid </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns current process id</p>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT &amp; Probe<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gaa6127aeb954da01691382a96ae2ab729"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa6127aeb954da01691382a96ae2ab729">&#9670;&nbsp;</a></span>PIN_IsAmxActive()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL PIN_IsAmxActive </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a>&#160;</td>
          <td class="paramname"><em>threadId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>AMX auxiliary API</p>
<p>Return TRUE is if AMX is in use in the specified thread, FALSE otherwise (AMX is in init state). Also return FALSE on CPU does not support AMX. (For additional information see Intel SDM documentation on AMX)</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">threadId</td><td>Pin thread ID for which AMX status is requested INVALID_THREADID can be used, Pin will find and use current thread (Not recommended as this flow cost more performance wise)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE is if AMX is in use, FALSE otherwise (AMX is in init state).</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux &amp; Windows<br  />
<b>CPU:</b> Intel(R) 64 architecture<br  />
</dd></dl>

</div>
</div>
<a id="ga82cdf4b2f74b73228a2dd64f8f49f8ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga82cdf4b2f74b73228a2dd64f8f49f8ba">&#9670;&nbsp;</a></span>TileCfg_GetPaletteID()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UINT8 TileCfg_GetPaletteID </td>
          <td>(</td>
          <td class="paramtype">UINT8 *&#160;</td>
          <td class="paramname"><em>tileCfgReg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return palette ID for the specified tile configuration value. (For additional information see Intel SDM documentation on AMX)</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">tileCfgReg</td><td>Pointer to a buffer holding tile configuration value (generated with IARG_REG_REFERENCE)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>palette ID for the specified tile configuration value.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux &amp; Windows<br  />
<b>CPU:</b> Intel(R) 64 architecture<br  />
</dd></dl>

</div>
</div>
<a id="ga09beb15faeb089c02f8154834f551d1f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga09beb15faeb089c02f8154834f551d1f">&#9670;&nbsp;</a></span>TileCfg_GetTileBytesPerRow()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UINT32 TileCfg_GetTileBytesPerRow </td>
          <td>(</td>
          <td class="paramtype">UINT8 *&#160;</td>
          <td class="paramname"><em>tileCfgReg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__REG.html#ga8f899d7ad1af070aae505a85cc998fa5">REG</a>&#160;</td>
          <td class="paramname"><em>tmm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return number of bytes per row for the specified tmm tile register and the specified tile configuration value. (For additional information see Intel SDM documentation on AMX)</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">tileCfgReg</td><td>Pointer to a buffer holding tile configuration value (generated with IARG_REG_REFERENCE) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">tmm</td><td>tile register enumeration for which this information is requested.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of bytes per row for the specified tmm tile register and the specified tile configuration value.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux &amp; Windows<br  />
<b>CPU:</b> Intel(R) 64 architecture<br  />
</dd></dl>

</div>
</div>
<a id="gac4bfc7dcba11e5b4c7a9f53e60bb75d1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac4bfc7dcba11e5b4c7a9f53e60bb75d1">&#9670;&nbsp;</a></span>TileCfg_GetTileRows()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UINT32 TileCfg_GetTileRows </td>
          <td>(</td>
          <td class="paramtype">UINT8 *&#160;</td>
          <td class="paramname"><em>tileCfgReg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__REG.html#ga8f899d7ad1af070aae505a85cc998fa5">REG</a>&#160;</td>
          <td class="paramname"><em>tmm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return number of rows for the specified tmm tile register and the specified tile configuration value. (For additional information see Intel SDM documentation on AMX)</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">tileCfgReg</td><td>Pointer to a buffer holding tile configuration value (generated with IARG_REG_REFERENCE) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">tmm</td><td>tile register enumeration for which this information is requested.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of rows for the specified tmm tile register and the specified tile configuration value.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux &amp; Windows<br  />
<b>CPU:</b> Intel(R) 64 architecture<br  />
</dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
